statefiles: add a dirfd helper function
authorDavid Härdeman <[email protected]>
Fri, 28 Nov 2025 10:35:49 +0000 (11:35 +0100)
committerÁlvaro Fernández Rojas <[email protected]>
Tue, 9 Dec 2025 15:29:08 +0000 (16:29 +0100)
commit5b01849cc42cb410fc4ce152519a27fb93d9bcb6
treed67d4d4108e384381d69e53b396ded3c62579949
parenteadde3d7dd748bea5288786110871ae5f3a62249
statefiles: add a dirfd helper function

The same logic was repeated three times in config.c, move it
to a single function in statefiles.c.

Signed-off-by: David Härdeman <[email protected]>
Link: https://github.com/openwrt/odhcpd/pull/333
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
src/config.c
src/statefiles.c
src/statefiles.h